Pro PHP 8 MVC by Christopher Pitt

Pro PHP 8 MVC by Christopher Pitt

Author:Christopher Pitt
Language: eng
Format: epub
ISBN: 9781484269572
Publisher: Apress


This is from framework/Database/Connection/MysqlConnection.php.

We also need to change how the field definitions are defined, to allow them to be added to existing tables and to allow them to be modified:private function stringForField(Field $field): string

{

$prefix = '';

if ($this->type === 'alter') {

$prefix = 'ADD';

}

if ($field->alter) {

$prefix = 'MODIFY';

}

if ($field instanceof BoolField) {

$template = "{$prefix} `{$field->name}` tinyint(4)";

if ($field->nullable) {

$template .= " DEFAULT NULL";

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.